<!DOCTYPE html>
<html>
    <head>
        <title>留言详细信息</title>
        <meta charset="UTF-8">
    </head>
    <style>
         table,h1{width:600px;margin:0 auto} 
         td{border:solid 1px yellow;}
    </style>
    <body>
        <h1>留言列表</h1>
    <table>
      <tr><td>ID</td><td>姓名</td><td>留言内容</td><td>发表日期</td><td>操作</td><tr>
          <?php foreach($data as $v):?>
           <tr>
               <td><?php echo $v['id'];?></td>
               <td><?php echo $v['poster'];?></td>
               <td><?php echo $v['comment'];?></td>
               <td><?php echo $v['date'];?></td>
               <td><a href="index.php?id=<?php echo $v['id']?>">查看</a></td>
          </tr>
          <?php endforeach;?>
        </table>
    </body>
</html>     